import axios from 'axios'

let axiosInstance =  axios.create({
  timeout: 5000,
  transformRequest: [function(data) {
    let queryStr = '';
    for(let k in data) {
      queryStr += k+'='+data[k]+'&';
    }
    return queryStr.replace(/\&$/, '');
  }],
});

axiosInstance.interceptors.response.use(res => {
  return res.data;
});

export default axiosInstance